<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 量词：规定字符出现的次数
        /* 
        {m}: 只出现m次
        {m,n}: m<=reg<=n
        {m,}: reg>=m
        */
        // test()

        
        var pwd ="1233klshfjds"  // 5-7位
        var reg = /[0-9]{5,7}/g 
        var reg2 = /[0-9]{4,}/g
        console.log(reg.test(pwd)); // false
        console.log(reg2.test(pwd))  // true
    </script>
</body>
</html>